#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main(int argc,char* argv[])
{   
    char c= 0;
    printf("是否选择登陆（y/n）:");
    scanf("%c",&c);
    unsigned int rname=3164;
    unsigned int rkey=12345;
    unsigned int name=0;
    unsigned int key=0;
    unsigned int true=3,i=0;
    unsigned int panduan1=0,panduan2=0;
     
     
    if(c == 'y')
    {
        do
        {
            true--;
            printf("请输入用户名:");
            scanf("%u",&name);
            printf("请输入密码:");
            scanf("%u",&key);
            if(name != rname)
            {
                printf("帐号未注册\n");
            }
            if(key !=rkey)
            {
                printf("密码错误\n");
            }
            if((name == rname) && (key == rkey))
            {
                printf("登陆成功\n");
                true=0;
            } 
        } while (true);
        
    }

    return 0;
}